<%-- 
    Document   : q300
    Created on : Jul 10, 2012, 11:58:31 AM
    Author     : ems
--%>

<%--
    Document   : permissionlogin
    Created on : Jul 9, 2012, 8:25:49 AM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<!DOCTYPE html>
<f:subview id="conf425475">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
            <!-- -->
            <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
            <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
            <link rel="stylesheet" type="text/css" href="../css/permissionUser.css"/>

        </head>
        <style type="text/css">
                    #main{
            width: 100%;
            
        }
        #content{
            width: 98%;
            padding: 0;
            margin-left: 1%;
        }
        #footer{
            width: 100%;
        }
            .sort_char label{
                cursor:pointer;
                padding:0px 4px;
            }
            .fast_search
            {
                margin-left: 300px;
                margin-top:0px!important;
                position: absolute;
            }
            .comment-content{
                margin-top:10px!important;            
            }
           
            .sort_char{
                color: white;
                font-weight: bold;               
                text-transform: uppercase;
            }
            .active-search{
                color:yellow !important;;
                font-weight: bold;
            }
            .checkbox{
                float:right;
                margin-right:120px;
                margin-top:15px;
            }
            .group{
                font-weight:bold;
            }
            .header_lable{
                color: #0055A6;
                font-size: 12px;
                font-weight: bold;
                width:130px;
                text-align: center;
                float:left;

            }
            .combobox{
                height:22px;
                width:150px;
                margin-top:4px;
            }
            span img {
                width:15px;
                height:15px;
            }
            .cbx_permission{
                float: left;
                margin-top: 45px;
            }
            
            .comment-content{
                margin-top: 10px !important;         
            }
            
        </style>
        <script type="text/javascript" language="javascript">
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                $j('.keysearch').live('keyup',function(){
                if($j('.keysearch').val() == ""){
                    $j('.contact').show();
                                   
                }else{
                    $j('.contact').hide();
                    $j('.contact').each(function(){
                        html = $j(this).html();
                        if(   ununicode(html).indexOf(  ununicode($j('.keysearch').val()) ) > -1    )  {
                            $j(this).show();
                        }else{
                            $j(this).hide();
                        }
                    });
                }

            });
                
                
                
                $j('.checkbox').live ('click', function(){
                    //alert($j(this).is(':checked')  + $j(this).attr('lang'));
                    showPleaseWait();
                    ///hidePleaseWait();
                    value = 0;
                    if($j(this).is(':checked')){
                        value = 1;
                    }
                    value = $j(this).attr('lang')+"--" + value;
                    $j.post("adminq050action.jsp?action="+$j(this).attr('id')+"&value="+value,function(data){

                        hidePleaseWait();

                    });
                });

            });

        </script>
        <body>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <h:outputText value="<div class='permission' lang='#{loginSession.right.MNU_DSQ_VIE}'></div>" escape="false"/>

            <a4j:form>

                <div id="content">
                     <div id="menu_top">
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#"><span class="donvi" lang="<h:outputText value="#{n450_n850.fh200}"/>"><h:outputText value="#{n450_n850.hv201}"/></span></a>
                            </div>
                            <div class="select_hidden">
                                <ul>
                                    <a4j:repeat value="" var="item">
                                        <li><a href="#"><span class="donvi" lang=""><h:outputText value="Khu vực 1"/></span></a></li> 
                                    </a4j:repeat>
                                </ul>
                            </div>
                        </div>
                        <%--     <div class="dropdown">
                                 <div class="select_choise department">
                                     <a href="#">
                                         <span class="department1" lang="<h:outputText value="#{n450_n850.fn450}"/>">
                                             <h:outputText rendered="#{n450_n850.fn450 != 0}" value="#{n450_n850.nv451}"/>
                                             <h:outputText rendered="#{n450_n850.fn450 == 0}" value="Tất cả"/>
                                         </span>
                                     </a>

                            </div>
                            <div class="select_hidden departmentlist">
                                <ul>
                                    <li><a href="#"><span class="department1" lang="<h:outputText value="0"/>"><h:outputText value="Tất cả"/> </span></a></li>                                  

                                    <a4j:repeat value="#{n450_n850.listN450Comb}" var="item">
                                        <li><a href="#"><span class="department1" lang="<h:outputText value="#{item.val}"/>"> <h:outputText value="#{item.label}"/></span></a></li>                                  
                                    </a4j:repeat>


                            </div>
                        </div>
                        <div class="dropdown2">
                            <div class="select_choise">
                                <a href="#">
                                    <span class="department2" lang="<h:outputText value="#{n450_n850.fn850}"/>">
                                        <h:outputText rendered="#{n450_n850.fn850 !=0}" value="#{n450_n850.nv851}"/>
                                        <h:outputText rendered="#{n450_n850.fn850 ==0}" value="Tất cả"/>
                                    </span>
                                </a>

                            </div>
                            <div class="select_hidden departmentlistN850">

                                <ul>
                                    <li><a href="#"><span class="department3" lang="<h:outputText value="0"/>">
                                                <h:outputText value="Tất cả"/>
                                            </span></a></li>                                  


                                    <a4j:repeat value="#{n450_n850.listN850Comb}" var="item">
                                        <li><a href="#"><span class="department2" lang="<h:outputText value="#{item.val}"/>">
                                                    <h:outputText value="#{item.label}"/>
                                                </span></a></li> 
                                            </a4j:repeat>
                                </ul>
                            </div>
                        </div> --%>
                    </div>
                    <div id="content_detail">
                        <div class="content">
                            <div class="contact" style="background:white">
                                <%-- Khach Hang --%>
                                <div class="fast_search">
                                    <h:inputText value="" onfocus="if(this.value=='')this.value='';" styleClass="keysearch"/>
                                    <div  style="margin-left:5px; float:left" class="buttonsearch"> </div>                  
                                </div> 
                                <div class="cbx_permission">
                                    <label><h:outputText value="#{locale.group_right}"/>:</label>
                                    <a4j:region>

                                        <h:selectOneMenu styleClass="combobox" id="vPhase" value="#{q400Controller.FQ300}" style="width:290px;">

                                            <f:selectItems value="#{q400Controller.cmbQ300}"></f:selectItems>
                                            <a4j:support event="onchange" actionListener="#{q400Controller.change}" 
                                                         reRender="reloadq400" />
                                        </h:selectOneMenu>
                                    </a4j:region>
                                </div>
                                <div class="list_content comment-content">
                                    <div class="header" >
                                        <div class="sort_char" style="margin-left:5px;">
                                            <label><h:outputText value="Danh sách quyền"/></label>                                           
                                        </div>

                                    </div>
                                    <div class="header-item">
                                        <div class="action">
                                            <h:panelGroup rendered="#{loginSession.right.DSQ_LST_CRE}">
                                            <a href="q400input.jsp?fq300=<h:outputText value="#{q400Controller.FQ300}"/>&height=236px&width=405px" class="fancybox add_new" id="fancybox">
                                                <img src="../images/add_tab.png" alt="add" title="add" /><label> <h:outputText style="cursor:pointer" value="#{locale.add_permission}"/></label>
                                            </a>
                                            </h:panelGroup>
                                        </div>
                                        <h:panelGroup id="reloadq400" >
                                            <a4j:repeat value="#{q400Controller.list}" var="item" id="q400content">
                                                <div class="contact" >

                                                    <div class="contact-content" lang="">
                                                        <div class="content-personal">
                                                            <div class="items_n550 " style="cursor:pointer; width:600px">

                                                                <span><h:outputText value="#{item.qv402} (#{item.qv401})  "/></span>
                                                            </div>
                                                            <div class="items-action" style="width:40px;">

                                                                <h:outputLink rendered="#{loginSession.right.DSQ_LST_MOD}" value="q400input.jsp?fq300=#{item.fq300}&fq400=#{item.pq400}&action=editN850&height=236px&width=405px" styleClass="fancybox" id="edit">
                                                                    <img src="../images/edit.png" alt="edit" title="edit"/>
                                                                </h:outputLink>
                                                                <h:outputLink rendered="#{loginSession.right.DSQ_LST_DEL}" value="delete.jsp?id=#{item.pq400}&pn100C=#{item.fq300}&flag=Q400&height=150px&width=300px" styleClass="fancybox card_delete" >
                                                                    <img src="../images/delete_1.png" alt="delete" title="delete" />
                                                                </h:outputLink>
                                                            </div>

                                                        </div>
                                                    </div>

                                                </div>
                                            </a4j:repeat>
                                        </h:panelGroup>
                                    </div>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
                <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                 height="30" width="40" zindex="2000">
                    <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                </rich:modalPanel>
                <h:inputHidden id="flag" value="#{q175Controller.flag}" />
            </a4j:form>


        </body>
    </html>
</f:subview>
